Page({
  data: {
    origin: '',
    terminus: '',
    month: '',
    day: '',
    selectedDateIndex: 0, // 当前选中的日期索引
    
  },

  arr(){
    const { day, month} = this.data;
    wx.navigateTo({
      url: `/pages/fromIn/fromIn?day=${day}&month=${month}`,
    })
  },

  date() {
    const now = new Date();
    const year = now.getFullYear();
    const month = now.getMonth() + 1;
    const day = now.getDate();
    this.setData({
      month,
      day
    });
  },

  handleDateClick(event) {
    const index = event.currentTarget.dataset.index;
    this.setData({
      selectedDateIndex: index
    });
  },

  onLoad(options) {
    const { origin, terminus } = options;
    this.setData({
      origin: origin,
      terminus: terminus,
    });
    this.date();
  }
});